Optimal. Leaf size=32 \[ -\frac{a \cot (c+d x)}{d}+\frac{i a \log (\sin (c+d x))}{d}-a x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0441037, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {3529, 3531, 3475} \[ -\frac{a \cot (c+d x)}{d}+\frac{i a \log (\sin (c+d x))}{d}-a x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3529
Rule 3531
Rule 3475
Rubi steps
\begin{align*} \int \cot ^2(c+d x) (a+i a \tan (c+d x)) \, dx &=-\frac{a \cot (c+d x)}{d}+\int \cot (c+d x) (i a-a \tan (c+d x)) \, dx\\ &=-a x-\frac{a \cot (c+d x)}{d}+(i a) \int \cot (c+d x) \, dx\\ &=-a x-\frac{a \cot (c+d x)}{d}+\frac{i a \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [C] time = 0.113574, size = 54, normalized size = 1.69 \[ -\frac{a \cot (c+d x) \, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};-\tan ^2(c+d x)\right )}{d}+\frac{i a (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.031, size = 39, normalized size = 1.2 \begin{align*}{\frac{ia\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-ax-{\frac{\cot \left ( dx+c \right ) a}{d}}-{\frac{ac}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.30948, size = 66, normalized size = 2.06 \begin{align*} -\frac{2 \,{\left (d x + c\right )} a + i \, a \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 2 i \, a \log \left (\tan \left (d x + c\right )\right ) + \frac{2 \, a}{\tan \left (d x + c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.41312, size = 135, normalized size = 4.22 \begin{align*} \frac{{\left (i \, a e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right ) - 2 i \, a}{d e^{\left (2 i \, d x + 2 i \, c\right )} - d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.52719, size = 53, normalized size = 1.66 \begin{align*} \frac{i a \log{\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} - \frac{2 i a e^{- 2 i c}}{d \left (e^{2 i d x} - e^{- 2 i c}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.25131, size = 103, normalized size = 3.22 \begin{align*} -\frac{4 i \, a \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right ) - 2 i \, a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{-2 i \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]